package com.example.webserviceclient;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * @author 陈乐
 * @version 1.0.0
 * @ClassName FileWSImplService.java
 * @Description TODO
 * @createTime 2022年01月05日 17:29:00
 */
@WebServiceClient(name = "WebServices",
        wsdlLocation = "http://localhost:8080/services/ws/api?wsdl",
        targetNamespace = "http://service.webservicedemo.example.com/")
public class FileWSImplService extends Service {

    public final static URL WSDL_LOCATION;

    public final static QName SERVICE = new QName("http://service.webserviceserver.example.com/", "WebServices");

    public final static QName FileWSImplPort = new QName("http://service.webserviceserver.example.com/", "WebServicesImplPort");

    static {
        URL url = null;
        try {
            url = new URL("http://localhost:8080/services/ws/api?wsdl");
        } catch (MalformedURLException e) {
            java.util.logging.Logger.getLogger(FileWSImplService.class.getName())
                    .log(java.util.logging.Level.INFO,
                            "Can not initialize the default wsdl from {0}", "http://localhost:8080/services/ws/api?wsdl");
        }
        WSDL_LOCATION = url;
    }

    public FileWSImplService(URL wsdlLocation) {
        super(wsdlLocation, SERVICE);
    }

    public FileWSImplService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public FileWSImplService() {
        super(WSDL_LOCATION, SERVICE);
    }

    public FileWSImplService(WebServiceFeature... features) {
        super(WSDL_LOCATION, SERVICE, features);
    }

    public FileWSImplService(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, SERVICE, features);
    }

    public FileWSImplService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }

    @WebEndpoint(name = "WebServicesImplPort")
    public FileWS getFileWSImplPort() {
        return super.getPort(FileWSImplPort, FileWS.class);
    }

    @WebEndpoint(name = "WebServicesImplPort")
    public FileWS getFileWSImplPort(WebServiceFeature... features) {
        return super.getPort(FileWSImplPort, FileWS.class, features);
    }

}